home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / prgtools / vtools21.zip / MCGALIB.H < prev    next >
Text File  |  1994-05-30  |  3KB  |  98 lines

  1.  
  2. /*
  3.    MCGALIB
  4.    (c) 1993/94 D.G. Sureau
  5.  
  6.    These functions are for VGA 19,
  7.    320 x 200, 256 colors screen
  8. */
  9.  
  10.  
  11.  
  12. /* Graphic window variables */
  13.  
  14. extern int XL;           /* Default = 0   */
  15. extern int XR;           /* Default = 319 */
  16. extern int YB;           /* Default = 0   */
  17. extern int YT;           /* Default = 199 */
  18.  
  19. extern unsigned char COLOR256;  /* Color for pixels */
  20.  
  21. extern unsigned char TEXTCOLOR;     /* Color for text display */
  22. extern unsigned char BACKCOLOR;     /* Color for text background */
  23.  
  24. extern unsigned long *SPVECTOR;     /* Pointer on sprites adr. */
  25. extern char *SPCODE;                /* Pointer on sprites code */
  26. extern unsigned int VGASCREEN;      /* Segment of VGA graphic screen */
  27.  
  28.  
  29. void selectscreen(int mode);
  30.      /* Change screen resolution
  31.     Mode = 19   MCGA
  32.     Mode = 3    Text
  33.      */
  34.  
  35. void window19(int xl,int yb,int xr,int yt); /* Define graphic window */
  36. void cls19(int col);                        /* Clear the whole screen  */
  37. void DOSwrite(int x,int y,char *txt);
  38.    /* Displays text at x,y  with TEXTCOLOR color # */
  39.  
  40. char *getspadr(int number);     /* Gets absolute adr of sprite in table */
  41.  
  42. void sprite256( int x,int y,char *ptr);
  43.  /* Puts spr. over background, inside a window */
  44.  
  45. void csprite256(int x,int y,char *ptr);
  46.  /* Puts spr. erases background, without clipping */
  47.  
  48. void csprite256c(int x,int y,char *adr);
  49.  /* Puts spr. erases background, inside a  window */
  50.  
  51. void xsprite256(int x,int y,char *adr);
  52.   /* Display a sprite in XOR mode */
  53.  
  54. void sprite(int number, int x,int y, unsigned char mode);
  55.   /* Puts sprite number #nn,
  56.      valid modes in sprlib are:
  57.      0 = copy
  58.      4 = over background
  59.   */
  60.  
  61. /* Function for saving and restoring block of screen */
  62.  
  63. void putblock(int x,int y,char *ptr);
  64. void getblock(int lft,int bottom,int rght,int hight,char *ptr);
  65.  
  66.  
  67. void icon19(int x,int y,char *ptr);  /* Put a 16 color icon on screen */
  68.  
  69. void writeRGB(char *adr);       /* Set 256 color palette from file */
  70. void writecolor(int colnum,int r,int g,int b); /* Create a color */
  71.  
  72. void setpix256(int x,int y,unsigned char color); /* Put a pixel */
  73. int  getpix256(int x,int y);      /* Get color of pixel at x, y */
  74. void line256(int x,int y,int x2,int y2, unsigned char color);
  75.         /* Draw a line from x, y to x2, y2 */
  76. void rectangle(int l,int b,int r,int t);  /* Put a rectangle */
  77. void fillblock(int l,int b,int r,int h,int color);
  78.             /* Fill a rectangle with a color among 256 */
  79.  
  80. void writeRGB(char *adr); /* Change the full palette */
  81. void writecolor(char creg,char r,char g,char b);
  82.    /* Set color register for a color number */
  83.  
  84. void synchro();           /* Wait for a screen refresh */
  85. void appear(char *palette);    /* Make the screen slowly appearing */
  86. void disappear(char *palette);  /* Make the screen slowly disappearing */
  87. void MCGAscroll(char decal);   /* Full screen scolling, BIOS */
  88. void scroll(int dir,int step);
  89.     /* Scrolling of the user-defined window
  90.        Step is the number of pixels to move
  91.        Dir is the direction:
  92.      1 = up
  93.      2 = right
  94.      3 = down
  95.      4 = left
  96.     */
  97.  
  98.